/*
 * 百度在线网络技术（北京）有限公司拥有本软件版权2021并保留所有权利。
 * Copyright 2021, Baidu.com,Inc 2:Baidu Online Network Technology (Beijing) Co.,Ltd,
 * All rights reserved.
 */

package com.azdebugit.autona.test.jso.other1;

import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;

public class User {

    @JSONField(name = "ID", ordinal = 3, serializeUsing = UserIDValueSerializer.class)
    private Long id;
    @JSONField(serialize = false)
    private String name;
    @JSONField(serialize = true, ordinal = 2)
    private String sex;

    @JSONField(deserialize = false)
    private String address;
    @JSONField(deserialize = true)
    private String phone;

    // 配置date序列化和反序列使用yyyyMMdd日期格式
    @JSONField(format = "yyyyMMdd", ordinal = 1)
    private Date date;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

}